{% extends "base.admin.html" %}
{% block headmeta %}
<script type="text/javascript">
	function addmoreitem()
	{
		ul = $("#photofieldlist");
		if(ul)
		{
			items = $("#photofieldlist>li");
			if(items.length > 0)
			{
				lastone = items[items.length -1];
				newone = lastone.cloneNode(true);
				if(newone)
				{
					ul.append(newone);
				}
			}
		}
	}
  </script>
{% endblock %}
{% block body %}
<div id="content" class="container">
<h1>{{title}}</h1>
{% if result %}
	<div class="status">{{msg}}</div>
{% else %}
	{% if status %}
	<div class="warn">{{msg}}</div>
	{% endif %}
{% endif %}
<div class="formcontainer">
	{% if screens %}
	<ul>
	{% for screen in screens %}
	<li>
		<img src="{{screen.url}}" />
		<div class="commands">
			<span><a href="{{request.path}}?action=delete&type={{type}}&key={{screen.key}}">Delete</a>Order:{{screen.order}}</span>
		</div>
	</li>
	{% endfor %}
	</ul>
	{% endif %}
	<form name="app" action="{{request.path}}" method="POST">
		<ul id="photofieldlist">
				<li>
					<span><label for="field_url">URL:</label><input type="text" name="field_url" id="field_url" value="" size="50"/></span>
					<span><label for="field_width">Width:</label><input type="text" name="field_width" id="field_height" value="215" size="5"/></span>
					<span><label for="field_height">Height:</label><input type="text" name="field_height" id="field_height" value="358" size="5"/></span>
				</li>
		</ul>	
		<div class="inputcontainer">
			<input type="hidden" name="type" value="{{type}}"/>
			<input type="submit" name="submit" value="Submit"/>
			<input type="button" name="addrow" value="Add One More Item" onclick="javascript:addmoreitem();"/>
		</div>
		</form>
	</div>
</div>
{% endblock %}